home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / compress / gnucpio.zip / TARHDR.H < prev    next >
C/C++ Source or Header  |  1992-07-18  |  2KB  |  63 lines

  1. /* Extended tar header from POSIX.1.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18. #ifndef _TARHDR_H
  19.  
  20. #define _TARHDR_H 1
  21.  
  22. #include <tar.h>
  23.  
  24. /* Size of `name' field.  */
  25. #define TARNAMESIZE 100
  26.  
  27. /* Size of `linkname' field.  */
  28. #define TARLINKNAMESIZE 100
  29.  
  30. /* Size of `prefix' field.  */
  31. #define TARPREFIXSIZE 155
  32.  
  33. /* Size of entire tar header.  */
  34. #define TARRECORDSIZE 512
  35.  
  36. struct tar_header
  37. {
  38.   char name[TARNAMESIZE];
  39.   char mode[8];
  40.   char uid[8];
  41.   char gid[8];
  42.   char size[12];
  43.   char mtime[12];
  44.   char chksum[8];
  45.   char typeflag;
  46.   char linkname[TARLINKNAMESIZE];
  47.   char magic[6];
  48.   char version[2];
  49.   char uname[32];
  50.   char gname[32];
  51.   char devmajor[8];
  52.   char devminor[8];
  53.   char prefix[TARPREFIXSIZE];
  54. };
  55.  
  56. union tar_record
  57. {
  58.   struct tar_header header;
  59.   char buffer[TARRECORDSIZE];
  60. };
  61.  
  62. #endif /* tarhdr.h */
  63.